-
Notifications
You must be signed in to change notification settings - Fork 6
commit finder: improve version commit finder for codediff tool #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
academo
commented
Feb 5, 2026
- Fetch remote tags on shallow clone to be able to switch refs
- Fetch remote ref to be able to switch branches and tags
- Fallback into gemini-cli for commit finding
| @@ -0,0 +1,53 @@ | |||
| // Package main provides a manual test harness for versioncommitfinder. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file exist to test the gemini prompt locally. I am leaving it here for future development.
the file itself is never imported or built in the validator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file looks quite easy to regenerate. Do you really need it? IMO it would polute the repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a fair point. I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you accidentally re-added it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! I was testing the recent changes. I'll remove it before I ask for another round of reviews
| ctx, | ||
| "gemini", | ||
| "-m", | ||
| "gemini-2.5-flash", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| llmClient, err := llmvalidate.New(context.Background(), geminiKey, "gemini-3-flash-preview") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gemini 3 flash performed worst in my tests over 2.5 and it was much slower. that's why I kept 2.5 flash. we should keep an eye when it becomes deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a comment explaining that?
| @@ -0,0 +1,53 @@ | |||
| // Package main provides a manual test harness for versioncommitfinder. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file looks quite easy to regenerate. Do you really need it? IMO it would polute the repo
| ctx, | ||
| "gemini", | ||
| "-m", | ||
| "gemini-2.5-flash", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a comment explaining that?
andresmgot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a couple of nits
| client := llmclient.NewGeminiClient() | ||
| if err := client.CanUseLLM(); err != nil { | ||
| return "", fmt.Errorf("cannot use LLM: %w", err) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Usually you do this kind of checks before calling the function